<template>
<div class="toast">
    <i class="icon-toast-jinggao iconfont"></i>
    <span>{{py}}</span>
</div>
</template>

<script>
import { mapState } from 'vuex';
export default {
  name: "Toast",

  data() {
    return {
        pleaseLogin:'请先登陆'
    };
  },
computed:{
  ...mapState({
    py:state=>state.showToast.py,
    type:state=>state.showToast.type,
  })
},

  mounted() {},

  methods: {},
};
</script>

<style lang="less">
  .toast{
    position: fixed;
    left: 50%;
    top: 0;
    transform: translate(-50%);
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px #fff;
    .icon-toast-jinggao{
      color: orangered;
    }
    .icon-toast_chenggong{
        color: green;
    }
    .icon-toast-shibai{
        color: red;
    }
  }
</style>